package com.ca.ridersclubapplication.view.input;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.ConstraintLayout;

import com.ca.ridersclubapplication.R;

public class InfoItem extends ConstraintLayout {

    public TextView labelView;
    public TextView valueView;
    public ImageView enterView;

    public InfoItem(@NonNull Context context) {
        super(context);
        initView(context);
    }

    public InfoItem(@NonNull Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        initView(context);
    }

    public InfoItem(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        initView(context);
    }

    private void initView(Context context) {
        View view = LayoutInflater.from(context).inflate(R.layout.info_item_layout, this);
        labelView = view.findViewById(R.id.tv_label);
        valueView = view.findViewById(R.id.tv_value);
        enterView = view.findViewById(R.id.iv_enter);
    }
}
